package WhatGUI;

import java.awt.event.*;

public class WhatListener implements ActionListener {

	private WhatGUI gui;
	private WhatDialog wd;
	
	public WhatListener(WhatGUI gui,WhatDialog wd) {
		this.gui=gui;
		this.wd = wd;
	}
	
	@Override
	public void actionPerformed(ActionEvent ae) {
		if(ae.getSource() == gui.btn1 ){
			gui.ta.setText("練習1\n練習2\n練習3\n行けるか？");
		}else if(ae.getSource() == gui.btn2){
			gui.ta.setText("");
		}else{
			wd.setVisible(true);
		}
	}

}
